#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
	int m = 0;
	int n = 0;
	int i = 0;
	int count = 0;
	scanf("%d %d", &m, &n);
	for (i = 0; i < 32; i++)
	{
		int a = (m >> i) % 2;
		int b = (n >> i) % 2;
		if (a != b)
		{
			count++;
		}
	}
	printf("%d\n", count);
	return 0;
}
